#!/usr/bin/python
# -*- coding: utf-8 -*-
# author: yoshiii.yoshiii@googlemail.com
# you found this code on http://yoshiii-box.googlecode.com/svn/ 
#

import sys, os
from shutil import move
import recursive_par2

dest_dir = "/media/Elements/"
if not os.path.exists(dest_dir):
	print dest_dir + "does not exist"
	raw_input("press enter to exit")

paths = sys.argv[1:]
paths = filter(os.path.isdir, paths)

for path in paths:
	try:
		path = os.path.abspath(path)
		print "creating... recinfo for ", path
		recursive_par2.create_recursive(path)
		dst = dest_dir + os.path.basename(path)
		print "moving %s => %s"%(path, dst)
		move(path, dst)
	except AssertionError, e:
		print e

#raw_input("press enter to exit")
